.class public Lcom/xingbook/park/activity/VersionAct;
.super Lcom/xingbook/park/activity/BaseActivity;

# interfaces
.implements Landroid/view/View$OnClickListener;


# direct methods
.method public constructor <init>()V
    .locals 0

    invoke-direct {p0}, Lcom/xingbook/park/activity/BaseActivity;-><init>()V

    return-void
.end method


# virtual methods
.method public e()Ljava/lang/String;
    .locals 2

    new-instance v0, Ljava/lang/StringBuilder;

    const-string v1, "\u8f6f\u4ef6\u7248\u672c"

    invoke-direct {v0, v1}, Ljava/lang/StringBuilder;-><init>(Ljava/lang/String;)V

    invoke-virtual {v0}, Ljava/lang/StringBuilder;->toString()Ljava/lang/String;

    move-result-object v0

    return-object v0
.end method

.method public onClick(Landroid/view/View;)V
    .locals 4

    invoke-virtual {p1}, Landroid/view/View;->getId()I

    move-result v0

    packed-switch v0, :pswitch_data_0

    :goto_0
    return-void

    :pswitch_0
    new-instance v0, Landroid/content/Intent;

    const-class v1, Lcom/xingbook/park/activity/UpdateAct;

    invoke-direct {v0, p0, v1}, Landroid/content/Intent;-><init>(Landroid/content/Context;Ljava/lang/Class;)V

    invoke-virtual {p0, v0}, Lcom/xingbook/park/activity/VersionAct;->startActivity(Landroid/content/Intent;)V

    goto :goto_0

    :pswitch_1
    new-instance v0, Landroid/content/Intent;

    const-string v1, "android.intent.action.VIEW"

    new-instance v2, Ljava/lang/StringBuilder;

    const-string v3, "market://details?id="

    invoke-direct {v2, v3}, Ljava/lang/StringBuilder;-><init>(Ljava/lang/String;)V

    invoke-virtual {p0}, Lcom/xingbook/park/activity/VersionAct;->getPackageName()Ljava/lang/String;

    move-result-object v3

    invoke-virtual {v2, v3}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;

    move-result-object v2

    invoke-virtual {v2}, Ljava/lang/StringBuilder;->toString()Ljava/lang/String;

    move-result-object v2

    invoke-static {v2}, Landroid/net/Uri;->parse(Ljava/lang/String;)Landroid/net/Uri;

    move-result-object v2

    invoke-direct {v0, v1, v2}, Landroid/content/Intent;-><init>(Ljava/lang/String;Landroid/net/Uri;)V

    const/high16 v1, 0x1000

    invoke-virtual {v0, v1}, Landroid/content/Intent;->addFlags(I)Landroid/content/Intent;

    :try_start_0
    invoke-virtual {p0, v0}, Lcom/xingbook/park/activity/VersionAct;->startActivity(Landroid/content/Intent;)V
    :try_end_0
    .catch Landroid/content/ActivityNotFoundException; {:try_start_0 .. :try_end_0} :catch_0

    goto :goto_0

    :catch_0
    move-exception v0

    const-string v0, "\u6ca1\u6709\u5b89\u88c5\u6709\u6548\u7684\u5e94\u7528\u5546\u5e97\u54e6~"

    const/4 v1, 0x0

    invoke-static {p0, v0, v1}, Landroid/widget/Toast;->makeText(Landroid/content/Context;Ljava/lang/CharSequence;I)Landroid/widget/Toast;

    move-result-object v0

    invoke-virtual {v0}, Landroid/widget/Toast;->show()V

    goto :goto_0

    :pswitch_data_0
    .packed-switch 0x1
        :pswitch_0
        :pswitch_1
    .end packed-switch
.end method

.method protected onCreate(Landroid/os/Bundle;)V
    .locals 13

    invoke-super {p0, p1}, Lcom/xingbook/park/activity/BaseActivity;->onCreate(Landroid/os/Bundle;)V

    new-instance v6, Lcom/xingbook/ui/XbLayout;

    invoke-direct {v6, p0}, Lcom/xingbook/ui/XbLayout;-><init>(Landroid/content/Context;)V

    const v0, -0xa0a0b

    invoke-virtual {v6, v0}, Lcom/xingbook/ui/XbLayout;->setBackgroundColor(I)V

    new-instance v0, Lcom/xingbook/ui/t;

    const/4 v1, 0x0

    invoke-direct {v0, p0, v1}, Lcom/xingbook/ui/t;-><init>(Landroid/app/Activity;Lcom/xingbook/ui/x;)V

    const-string v1, "\u8f6f\u4ef6\u7248\u672c"

    iput-object v1, v0, Lcom/xingbook/ui/t;->c:Ljava/lang/String;

    const v1, -0x33ffec

    iput v1, v0, Lcom/xingbook/ui/t;->h:I

    const/4 v1, 0x0

    const/4 v2, 0x0

    invoke-static {p0}, Lcom/xingbook/c/n;->c(Landroid/app/Activity;)I

    move-result v3

    sget v4, Lcom/xingbook/ui/t;->b:I

    invoke-virtual {v0, v1, v2, v3, v4}, Lcom/xingbook/ui/t;->layout(IIII)V

    invoke-virtual {v6, v0}, Lcom/xingbook/ui/XbLayout;->addView(Landroid/view/View;)V

    invoke-static {p0}, Lcom/xingbook/c/n;->f(Landroid/app/Activity;)F

    move-result v1

    const/high16 v0, 0x42c8

    mul-float/2addr v0, v1

    invoke-static {v0}, Ljava/lang/Math;->round(F)I

    move-result v7

    const/high16 v0, 0x41a0

    mul-float/2addr v0, v1

    invoke-static {v0}, Ljava/lang/Math;->round(F)I

    move-result v8

    const/high16 v0, 0x41a0

    mul-float/2addr v0, v1

    invoke-static {v0}, Ljava/lang/Math;->round(F)I

    move-result v9

    invoke-virtual {p0}, Lcom/xingbook/park/activity/VersionAct;->getResources()Landroid/content/res/Resources;

    move-result-object v0

    const v2, 0x7f020208

    invoke-static {v0, v2}, Lcom/xingbook/c/n;->a(Landroid/content/res/Resources;I)Landroid/graphics/Bitmap;

    move-result-object v0

    new-instance v2, Landroid/widget/ImageView;

    invoke-direct {v2, p0}, Landroid/widget/ImageView;-><init>(Landroid/content/Context;)V

    invoke-virtual {v2, v0}, Landroid/widget/ImageView;->setImageBitmap(Landroid/graphics/Bitmap;)V

    sget v3, Lcom/xingbook/ui/t;->b:I

    add-int/2addr v3, v9

    invoke-static {p0}, Lcom/xingbook/c/n;->c(Landroid/app/Activity;)I

    move-result v4

    invoke-virtual {v0}, Landroid/graphics/Bitmap;->getWidth()I

    move-result v5

    sub-int/2addr v4, v5

    int-to-float v4, v4

    const/high16 v5, 0x4000

    div-float/2addr v4, v5

    invoke-static {v4}, Ljava/lang/Math;->round(F)I

    move-result v4

    invoke-virtual {v0}, Landroid/graphics/Bitmap;->getWidth()I

    move-result v5

    add-int/2addr v5, v4

    invoke-virtual {v0}, Landroid/graphics/Bitmap;->getHeight()I

    move-result v0

    add-int/2addr v0, v3

    invoke-virtual {v2, v4, v3, v5, v0}, Landroid/widget/ImageView;->layout(IIII)V

    invoke-virtual {v6, v2}, Lcom/xingbook/ui/XbLayout;->addView(Landroid/view/View;)V

    invoke-static {p0}, Lcom/xingbook/c/n;->c(Landroid/app/Activity;)I

    move-result v2

    sub-int v10, v2, v8

    const/high16 v2, 0x41a0

    mul-float/2addr v2, v1

    invoke-static {v2}, Ljava/lang/Math;->round(F)I

    move-result v11

    new-instance v2, Ljava/lang/StringBuilder;

    invoke-direct {v2}, Ljava/lang/StringBuilder;-><init>()V

    const-string v3, "\u661f\u5b9d\u4e50\u56ed "

    invoke-virtual {v2, v3}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;

    :try_start_0
    invoke-virtual {p0}, Lcom/xingbook/park/activity/VersionAct;->getPackageManager()Landroid/content/pm/PackageManager;

    move-result-object v3

    invoke-virtual {p0}, Lcom/xingbook/park/activity/VersionAct;->getPackageName()Ljava/lang/String;

    move-result-object v4

    const/4 v5, 0x0

    invoke-virtual {v3, v4, v5}, Landroid/content/pm/PackageManager;->getPackageInfo(Ljava/lang/String;I)Landroid/content/pm/PackageInfo;

    move-result-object v3

    const/16 v4, 0x76

    invoke-virtual {v2, v4}, Ljava/lang/StringBuilder;->append(C)Ljava/lang/StringBuilder;

    move-result-object v4

    iget-object v3, v3, Landroid/content/pm/PackageInfo;->versionName:Ljava/lang/String;

    invoke-virtual {v4, v3}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;
    :try_end_0
    .catch Landroid/content/pm/PackageManager$NameNotFoundException; {:try_start_0 .. :try_end_0} :catch_0

    :goto_0
    add-int/2addr v0, v9

    new-instance v3, Lcom/xingbook/ui/ad;

    invoke-direct {v3, p0}, Lcom/xingbook/ui/ad;-><init>(Landroid/content/Context;)V

    invoke-virtual {v2}, Ljava/lang/StringBuilder;->toString()Ljava/lang/String;

    move-result-object v2

    iput-object v2, v3, Lcom/xingbook/ui/ad;->a:Ljava/lang/String;

    const/high16 v2, 0x4238

    mul-float/2addr v2, v1

    iput v2, v3, Lcom/xingbook/ui/ad;->c:F

    const v2, -0x99999a

    iput v2, v3, Lcom/xingbook/ui/ad;->b:I

    const v2, -0xa0a0b

    iput v2, v3, Lcom/xingbook/ui/ad;->i:I

    const/16 v2, 0x11

    iput v2, v3, Lcom/xingbook/ui/ad;->d:I

    add-int v2, v0, v7

    invoke-virtual {v3, v8, v0, v10, v2}, Lcom/xingbook/ui/ad;->layout(IIII)V

    invoke-virtual {v6, v3}, Lcom/xingbook/ui/XbLayout;->addView(Landroid/view/View;)V

    add-int v12, v2, v9

    new-instance v0, Lcom/xingbook/ui/ad;

    invoke-direct {v0, p0}, Lcom/xingbook/ui/ad;-><init>(Landroid/content/Context;)V

    invoke-virtual {v0, p0}, Lcom/xingbook/ui/ad;->setOnClickListener(Landroid/view/View$OnClickListener;)V

    const/4 v2, 0x1

    invoke-virtual {v0, v2}, Lcom/xingbook/ui/ad;->setId(I)V

    const-string v2, "\u8f6f\u4ef6\u66f4\u65b0"

    iput-object v2, v0, Lcom/xingbook/ui/ad;->a:Ljava/lang/String;

    iget v2, v3, Lcom/xingbook/ui/ad;->c:F

    iput v2, v0, Lcom/xingbook/ui/ad;->c:F

    const v2, -0x99999a

    iput v2, v0, Lcom/xingbook/ui/ad;->b:I

    const-string v2, "\u7acb\u5373\u68c0\u6d4b"

    iput-object v2, v0, Lcom/xingbook/ui/ad;->f:Ljava/lang/String;

    const v2, -0xa5440a

    iput v2, v0, Lcom/xingbook/ui/ad;->g:I

    const/high16 v2, 0x4210

    mul-float/2addr v2, v1

    iput v2, v0, Lcom/xingbook/ui/ad;->h:F

    const/4 v2, -0x1

    iput v2, v0, Lcom/xingbook/ui/ad;->i:I

    const/high16 v2, 0x4120

    iput v2, v0, Lcom/xingbook/ui/ad;->j:F

    const/16 v2, 0x13

    iput v2, v0, Lcom/xingbook/ui/ad;->d:I

    const v2, -0x656566

    const/high16 v3, 0x41d0

    mul-float/2addr v3, v1

    invoke-static {v3}, Ljava/lang/Math;->round(F)I

    move-result v3

    const/high16 v4, 0x4240

    mul-float/2addr v1, v4

    invoke-static {v1}, Ljava/lang/Math;->round(F)I

    move-result v1

    const/4 v4, 0x1

    invoke-virtual {v0, v2, v3, v1, v4}, Lcom/xingbook/ui/ad;->a(IIII)V

    const v1, -0x777778

    const/4 v2, 0x1

    const/4 v3, 0x1

    const/4 v4, 0x1

    const/4 v5, 0x1

    invoke-virtual/range {v0 .. v5}, Lcom/xingbook/ui/ad;->a(IIIII)V

    iput v11, v0, Lcom/xingbook/ui/ad;->l:I

    const v1, -0x2a2a2b

    invoke-virtual {v0, v1}, Lcom/xingbook/ui/ad;->setHilighted(I)V

    add-int v1, v12, v7

    invoke-virtual {v0, v8, v12, v10, v1}, Lcom/xingbook/ui/ad;->layout(IIII)V

    invoke-virtual {v6, v0}, Lcom/xingbook/ui/XbLayout;->addView(Landroid/view/View;)V

    add-int/2addr v1, v9

    invoke-virtual {v0}, Lcom/xingbook/ui/ad;->b()Lcom/xingbook/ui/ad;

    move-result-object v0

    invoke-virtual {v0, p0}, Lcom/xingbook/ui/ad;->setOnClickListener(Landroid/view/View$OnClickListener;)V

    const/4 v2, 0x2

    invoke-virtual {v0, v2}, Lcom/xingbook/ui/ad;->setId(I)V

    const-string v2, "\u53bb\u8bc4\u5206"

    iput-object v2, v0, Lcom/xingbook/ui/ad;->a:Ljava/lang/String;

    const-string v2, "\u67e5\u770b"

    iput-object v2, v0, Lcom/xingbook/ui/ad;->f:Ljava/lang/String;

    add-int v2, v1, v7

    invoke-virtual {v0, v8, v1, v10, v2}, Lcom/xingbook/ui/ad;->layout(IIII)V

    invoke-virtual {v6, v0}, Lcom/xingbook/ui/XbLayout;->addView(Landroid/view/View;)V

    invoke-virtual {p0, v6}, Lcom/xingbook/park/activity/VersionAct;->setContentView(Landroid/view/View;)V

    return-void

    :catch_0
    move-exception v3

    const-string v3, "- \u672a\u80fd\u68c0\u6d4b\u5230\u7248\u672c\u53f7"

    invoke-virtual {v2, v3}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;

    goto/16 :goto_0
.end method

.method public onKeyDown(ILandroid/view/KeyEvent;)Z
    .locals 2

    invoke-virtual {p2}, Landroid/view/KeyEvent;->getKeyCode()I

    move-result v0

    const/4 v1, 0x4

    if-ne v0, v1, :cond_0

    invoke-virtual {p0}, Lcom/xingbook/park/activity/VersionAct;->finish()V

    const/4 v0, 0x1

    :goto_0
    return v0

    :cond_0
    const/4 v0, 0x0

    goto :goto_0
.end method

.method protected onPause()V
    .locals 1

    invoke-super {p0}, Lcom/xingbook/park/activity/BaseActivity;->onPause()V

    invoke-static {p0}, Lcom/baidu/mobstat/StatService;->onPause(Landroid/content/Context;)V

    invoke-virtual {p0}, Lcom/xingbook/park/activity/VersionAct;->j()Ljava/lang/String;

    move-result-object v0

    invoke-static {v0}, Lcom/a/a/g;->b(Ljava/lang/String;)V

    invoke-static {p0}, Lcom/a/a/g;->a(Landroid/content/Context;)V

    return-void
.end method

.method protected onResume()V
    .locals 1

    invoke-super {p0}, Lcom/xingbook/park/activity/BaseActivity;->onResume()V

    invoke-static {p0}, Lcom/baidu/mobstat/StatService;->onResume(Landroid/content/Context;)V

    invoke-virtual {p0}, Lcom/xingbook/park/activity/VersionAct;->j()Ljava/lang/String;

    move-result-object v0

    invoke-static {v0}, Lcom/a/a/g;->a(Ljava/lang/String;)V

    invoke-static {p0}, Lcom/a/a/g;->b(Landroid/content/Context;)V

    return-void
.end method
